<?php
							session_start();
							if (isset($_SESSION['user_id']))
							{
							
							}
							else
							{
								echo "<script>window.location.href = '../index.php'</script>";
							}
							
?>
<html>
	<title></title>
	<head>
        <?php 
             header('Content-type: text/html; charset=UTF-8') ;
        ?>
        <meta http-equiv="Content-type" value="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="../css/layout.css" type="text/css" />
		<script type="text/javascript" src="../js/load_project.js"></script>
		<script type="text/javascript" src="../js/show_hide.js" ></script>
		<script type="text/javascript" src="../js/jquery.min.js"></script>
		<script type="text/javascript" >
      $(document).ready(function () {

          $(".account").click(function () {
              var X = $(this).attr('id');
              if (X == 1) {
                  $(".submenu").hide();
                  $(this).attr('id', '0');
              }
              else {
                  $(".submenu").show();
                  $(this).attr('id', '1');
              }

          });

          //Mouse click on sub menu
          $(".submenu").mouseup(function () {
              $(".submenu").hide();
              return false
          });

          //Mouse click on my account link
          $(".account").mouseup(function () {
              return false
          });

          //Document Click
          $(document).mouseup(function () {
              $(".submenu").hide();
              $(".account").attr('id', '');
          });
      });



     

		</script>
		
		
		
		
		<style>
			.middle{vertical-align:middle;}
		</style>
        <style>
          @font-face
                {
                    font-family:Quinhon;
                    src:url(../font/QUINHON.ttf) format('truetype');
                }
        </style>
	</head>
	<body onLoad="load_project(<?php session_start(); if (isset($_SESSION["current_project_id"])){echo $_SESSION["current_project_id"]; }else{echo 1;} ?>)">		
        <center>
			
						<p class="whiteLetter" style="font-size:25pt;padding-bottom:5px;cursor:pointer" onclick="backtomainscreen();" >
						<b class="whiteLetter" style="font-size:39pt; font-family:Quinhon;">B</b>.ine
						<p class="whiteLetter" style="font-size:10.5pt;opacity:0.7; margin-top:-5px; margin-bottom:15px">pine entertainment bug base</p>
					</p>
						
			
		<div id="content" style="width: 1920px">
			<table border="0" height="66px" style="margin:0 auto;">
						<tr>
							<td align="right" style="color:white; font-size:12.5px">Project&nbsp;&nbsp;
							<td align="right" style="color:white; font-size:12.5px">
								<div class="styled-select-green">
									<select name="project" id="project"  class="combobox-green" onChange="load_project(this.value)"> 
										<?php
										
											include("../DATA/config.php");
											$sql_select_project = "select * from project";
											mysql_query("SET NAMES 'utf8'");
											$result = mysql_query($sql_select_project);
                                            $current = 1;
										    if (isset($_SESSION["current_project_id"]))
                                            {
                                                $current = $_SESSION["current_project_id"];
                                            }
											while($row = mysql_fetch_array($result)) 
											{ 
												$project_id = $row["project_id"];
												$project_name = $row["project_name"];
												$deadline = $row["deadline"];	
                                                if ($project_id == $current)
                                                {
                                                    echo "<option value='$project_id' selected>$project_name</option>";
                                                }
                                                else
                                                {
                                                    echo "<option value='$project_id'>$project_name</option>";
                                                }
                                              					
												
											}
										
										?>						
									</select>
								</div>
							</td>
							
							
							</td>
							<td style="width:91px;">&nbsp;</td>
							<td style="width:98px;text-align: left"><input type="button" value="Add Bug" class="button_addbug" onClick="load_frmAddBug()" /></td>
							<td style="width:85px;">&nbsp;</td>
							<td style="width:200px;text-align: left;color:#fff">Bug ID&nbsp;&nbsp;<input style="color:rgb(0,116,38);width:116px;height:25px;border:0;" type="text" id="txtsearch" name="txtsearch" onChange="this.value" onkeypress="press_enter(event)"/><input id="btnsearch" type="button" value=" " class="button_search" onClick="searchbug()"/></td>
							<td style="width:74px;">&nbsp;</td>
							<td style="width:25px;text-align: left"><img title="Change avatar" src="<?php echo $_SESSION['avatarURL'] ; ?>" style="width:25px; height:25px; padding-right:10px;"/></td>
							<td colspan="4" style=" text-align='left' ;color:white"><?php include("../DATA/convert_bugID.php"); $name = convert_name($_SESSION['username']);   echo strtoupper($name) ; ?></td>
							<!--
							<form method="POST" action="../DATA/process_frmLogout.php">
							<td align="center"><input class='button_login' type="submit" value="Logout!" style="display:none"/></td>
							</form>-->
						</tr>
					</table>
				
			
		</div>
		<!--
		<div id="wrapper">
			<table width="1820px" border="0" cellpadding="0" cellspacing="0">
				<tr>
				
					<table border="0" id='project_name_old' width="1820px"  style='background-color:rgb(229,229,229);border-collapse: collapse;' cellpadding="" cellspacing="0">
					</table>
				
			
				<tr/>
				<tr>
					<td></td>
						<td align="center">					
							<p class="footer" style="padding-top:470px;"> 2013 Pine Entertainment. All rights reserved</p>
						</td>
					<td></td>
				</tr>
			</table>
		
		
		</div>
		-->
		<div id="project_name" style="width: 1920px">
		</div>
		<div style="padding-top:460px; text-align: center">
			
				<p class="footer"> 2013 Pine Entertainment. All rights reserved</p>
			
		</div>
            </center>
	</body>
</html>
